﻿<div class="module-container">
    <div class="search-panel">
        <form class="form-horizontal search-table">
            <div class="row">
                <div class="col-md-4">
                    <input class="form-control" name="name" type="text" placeholder="请输入题目名称"
                           title="请输入题目名称">
                </div>
                <div class="col-md-2">
                    <select class="form-control uiselect uiselectsubmit" name="businessType"
                            data-has-text-field="false">
                        @Html.EmptyOption("请选择业务类型")
                        @Html.BusinessTypeOption()
                    </select>
                </div>
                <div class="col-md-2">
                    <select class="form-control uiselect uiselectsubmit" name="questType"
                            data-has-text-field="false">
                        @Html.EmptyOption("请选择题目类型")
                        @Html.QuestTypeOption()
                    </select>
                </div>
                <div class="col-md-2">
                    <select class="form-control uiselect uiselectsubmit" name="workType"
                            data-has-text-field="false">
                        @Html.EmptyOption("请选择从业类别")
                        @Html.TrainCategoryOption()
                    </select>
                </div>

                <div class="col-md-2">
                    <select class="form-control uiselect uiselectsubmit" name="questUnit"
                            data-has-text-field="false">
                        @Html.EmptyOption("请选择题目单元")
                        @Html.QuestUnitOption()
                    </select>
                </div>

            </div>
            <div class="row search-row">
                <div class="col-md-12 text-right">
                    <button class="btn btn-primary" type="submit">
                        <i class="fa fa-search"></i> 查询
                    </button>

                    <a class="btn btn-success uimodal" data-size="lg" data-url="@Url.Action("Create")">
                        <i class="fa fa-plus"></i> 新建
                    </a>

                    <a class="btn btn-danger tmdelete" data-table=".uitable" data-url="@Url.Action("Delete")">
                        <i class="fa fa-trash-o"></i> 删除
                    </a>

                    <a class="btn btn-success uiwindow" data-url="@Url.Action("Import")">
                        <i class="fa fa-cloud-upload"></i> 导入
                    </a>

                    <a class="btn btn-default" id="table_export" data-url="@Url.Action("Export")">
                        <i class="fa fa-share-square-o"></i> 导出
                    </a>
                </div>
            </div>
        </form>
    </div>
    <div class="uitable" data-url="@Url.Action("Grid")">
        @Html.Action("Grid")
    </div>
</div>
<script>
    $('#table_export').on('click', function () {
        var url = $(this).data('url') + '?' + $.param(fx.serializeForm($('.search-table')));
        window.location.href = url;
    });
</script>